﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace LaoLuo.Common.Mvc
{
    public class CorsApiController : ExtendedApiController
    {
        public override System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> ExecuteAsync(System.Web.Http.Controllers.HttpControllerContext controllerContext, System.Threading.CancellationToken cancellationToken)
        {
            HttpContext.Current.Response.AppendHeader("Access-Control-Allow-Origin", "*");

            return base.ExecuteAsync(controllerContext, cancellationToken);
        }
    }
}
